import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/admin/home'
import Register from '@/components/admin/register'
import User from '@/components/admin/user'
import testCase from '@/components/admin/testcase'
import _dataList from '@/components/admin/_datalist'

import thome from '@/components/tester/thome'
import taskList from '@/components/tester/taskList'

Vue.use(Router)
const routes = [
  {
    path: "/",
    redirect: "/register"
  },
  {
    path: "/register",
    component: Register
  },
  {
    path: "/home",
    redirect: "/user"
  },
  {
    path: "/home",
    component: Home,
    children: [
      { path: '/user', component: User },
      { path: '/testcase', component: testCase},
      { path: '/_datalist', component:_dataList},
    ] 
  },
  {
    path: "/thome",
    redirect: "/tasklist"
  },
  {
    path: "/thome",
    component:thome,
    children: [
      { path: '/tasklist', component: taskList },
    ] 
  },
]
const router = new Router({
  routes
})
export default router